<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<title><?php echo C('defaultinfo.name');?> - Powered By 新致HRM</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		<meta name="description" content=""/>
		<meta name="author" content="HRM"/>
		<link rel="shortcut icon" href="__PUBLIC__/ico/favicon.png"/>
		<link rel="stylesheet" href="__PUBLIC__/css/bootstrap.css">
		<link rel="stylesheet" href="__PUBLIC__/css/hrms.css">
		<script src="__PUBLIC__/js/jquery.min.js"></script>
		<script src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script src="__PUBLIC__/js/nongli.js"></script>
		<script src="__PUBLIC__/js/calendar.js"></script>
		<!--[if lt IE 9]>
		<script src="__PUBLIC__/js/html5shiv.min.js"></script>
		<script src="__PUBLIC__/js/respond.min.js"></script>
		<![endif]-->
	</head>
	<body>
<?php echo W('Navigation');?>
<script src="__PUBLIC__/js/datepicker/WdatePicker.js" type="text/javascript"></script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">日程</div>
		<div class="row-table-body">
			<p class="form-title"><a class="pull-right btn btn-primary btn-xs" href="<?php echo U('core/event/index');?>">日程列表</a>添加日程</p>
			<form class="form-horizontal" action="<?php echo U('core/event/add');?>" method="post" >
				<div class="form-group">
					<label class="col-sm-2 control-label" for="title">主题</label>
					<div class="col-sm-3">
						<input id="title" class="form-control" type="text" name="title">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="user_name">负责人</label>
					<div class="col-sm-3">
						<input id="user_name" class="form-control" type="text" name="executor_name" value="<?php echo session('name');?>">
						<input id="user_id" type="hidden" name="executor_id" value="<?php echo session('user_id');?>">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="address">地址</label>
					<div class="col-sm-3">
						<input id="address" type="text" class="form-control" name="address" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="start_time">开始时间</label>
					<div class="col-sm-3">
						<input id="start_time" type="text" class="form-control" name="start_time" value="<?php echo date('Y-m-d H:i:s');?>" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="end_time">结束时间</label>
					<div class="col-sm-3">
						<input id="end_time" class="form-control" type="text" name="end_time" value="<?php echo date('Y-m-d H:i:s',mktime(23,59,59,date('m'),date('d'),date('Y')));?>" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" >
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="content">描述</label>
					<div class="col-sm-5">
						<textarea class="form-control" id="content" rows="4" name="content"></textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="sms"></label>
					<div class="col-sm-3">
						<input type="submit" class="btn btn-primary" value="保存" />
					</div>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
	$(function(){
		$('#user_name').click(function(){
			$('#alert').modal({
				show:true,
				remote:'<?php echo u("core/user/getSubUserDialog","self=1");?>'
			});
		});
	});
</script>
<div class="modal fade" id="alert" tabindex="-1" data-backdrop="static">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">提示信息</h4>
			</div>
			<div class="modal-body">
			<?php if(is_array($alert)): foreach($alert as $k=>$v): if(is_array($v)): foreach($v as $kk=>$vv): ?><div class="alert alert-<?php echo ($k); ?>">
					<?php echo ($vv); ?>
				</div><?php endforeach; endif; endforeach; endif; ?>
			</div>
		</div>
	</div>
</div>
<?php if(!empty($alert)): ?><script type="text/javascript">
	$('#alert').modal('show');
	var alert_n = setInterval('$("#alert").modal("hide")',1000);
	$('#alert').on('hide.bs.modal', function (e) {
		clearInterval(alert_n);
	});
</script><?php endif; ?>
		<!-- <div id="footer">
			<div class="container">
				<p class="text-muted credit">
					HRM © 2013 <a href="http://www.ccds24.com" target="_blank">河南锐骑文化传播有限公司</a>版权所有
				</p>
			</div>
		</div> -->
	</body>
</html>